<div class="deputations index">
	<h2><?php __('Deputations');?></h2>
         <?php
	if($session->read('Auth.User.role')!=1)
	echo $this->Html->link(__('Add New', true), array('controller' => 'deputations','action' => 'add')); ?>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th>SL<?php //echo $this->Paginator->sort('id');?></th>
			<th>Designation<?php //echo $this->Paginator->sort('designation');?></th>
			<th>Organization<?php //echo $this->Paginator->sort('organization');?></th>
			<th>Country<?php //echo $this->Paginator->sort('country');?></th>
			<th>Source of fund<?php //echo $this->Paginator->sort('sourceoffund');?></th>
			<th>From<?php //echo $this->Paginator->sort('from');?></th>
			<th>To<?php //echo $this->Paginator->sort('to');?></th>
<!--			<th><?php //echo $this->Paginator->sort('user_id');?></th>-->
			<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($deputations as $deputation):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['designation']; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['organization']; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['country']; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['sourceoffund']; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['from']; ?>&nbsp;</td>
		<td><?php echo $deputation['Deputation']['to']; ?>&nbsp;</td>
<!--		<td>
			<?php //echo $this->Html->link($deputation['User']['id'], array('controller' => 'users', 'action' => 'view', $deputation['User']['id'])); ?>
		</td>-->
		<td class="actions">
			<?php //echo $this->Html->link(__('View', true), array('action' => 'view', $deputation['Deputation']['id'])); ?>
			<?php echo $this->Html->link(__('Edit', true), array('controller' => 'deputations','action' => 'edit', $deputation['Deputation']['id'])); ?>
			<?php echo $this->Html->link(__('Delete', true), array('controller' => 'deputations','action' => 'delete', $deputation['Deputation']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $deputation['Deputation']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	
</div>
